using System;
using System.Linq;
using System.Collections.Generic;
using Edge.Common;
using Edge.Common.ComponentModel.Notification;
using Edge.Common.Services;
using Edge.Common.Utils;
using Edge.DAL.Common;
using Edge.DAL.Managers;
using NHibernate;
using NHibernate.Expression;
using Shop.Business.Domain.Catalog;
using Shop.Business.Domain.Customers;
using Shop.Business.Domain.Orders;

namespace Shop.DAL.Managers
{
    class DeliveryTypeManager : AbstractManager<DeliveryType, int, Customer>, IDeliveryTypeManager
    {
        public PaymentType GetPaymentType(DeliveryType type)
        {
//            string sql = "select {p.Id} from delivery_type" +
//                         "left join delivery_payment_mapping on delivery_type.Id = delivery_payment_mapping.deliveryTypeId" +
//                         "left join payment_type {p} on p.Id = delivery_payment_mapping.paymentTypeId"+
//                         "where delivery_type.Id = " + type.Id.ToString();
//            IQuery query = Session.CreateSQLQuery(sql).SetResultSetMapping();
//            var ret = query.List();
            return PaymentType.Cash;
        }
    }
}